<%@ page import="java.util.Arrays" %><%--
  Created by IntelliJ IDEA.
  User: lyh
  Date: 2025/3/9
  Time: 10:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>服务器</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");//设置以utf-8进行解码，解决汉字乱码问题
    String name=request.getParameter("aa");//获取参数
    String pwd=request.getParameter("bb");
    String edu=request.getParameter("cc");
    String sex=request.getParameter("sex");
    String[] cx=request.getParameterValues("dd");
%>
请求的用户名：<%=name%><br/>
密码为：<%=pwd%><br/>
学历为:<%=edu%><br/>
性别为:<%=sex%>
爱好为:<%=Arrays.toString(cx)%>

<%
    //response.setHeader("refresh","4");//让客户端浏览器每隔四秒刷新一次
    response.setHeader("refresh","4;URL=demo.jsp");//跳转到新的页面
%>

</body>
</html>
